const recruitmentService = require("../service/recruitmentService.js");

class caseController {
    // 创建招聘
    async create(ctx) {
        const result = await recruitmentService.create(ctx.request.body);
        ctx.body = result;
    }
    // 删除招聘
    async remove(ctx) {
        const result = await recruitmentService.delete(ctx.params.id);
        ctx.body = result;
    }
    // 更新招聘
    async update(ctx) {
        const result = await recruitmentService.update(
            ctx.params.id,
            ctx.request.body
        );
        ctx.body = result;
    }

    // 查看招聘数据库单条数据
    async get(ctx) {
        const result = await recruitmentService.get(ctx.params.id);
        ctx.body = result;
    }
    async getList(ctx) {
        const result = await recruitmentService.getList(ctx.request.body);
        ctx.body = result;
    }


}
module.exports = new caseController